{% extends 'app_planning/index.html' %}

{% block app_planning %}
    <h1>Mis plannings</h1>
    <ul>
        {% for planning in Plannings %}
            <li>
                {% if planning.active %}
                    Activo
                {% else %}
                    <a href="{% url activate_planning planning.id %}">Inactivo</a>
                {% endif %}
                - <a href="{% url view_planning planning.id %}">{{ planning.title }}</a>
                - {{ planning.create_datetime }}
                <a href="{% url delete_planning planning.id %}">[X]</a>
          </li>
        {% endfor %}
        <a href="{% url new_planning %}" class="btn primary">Nuevo</a>
    </ul>
{% endblock %}
